package com.syf.core.actuator.config;

import com.syf.core.actuator.SyActuatorCont;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

@Data
@ConfigurationProperties(prefix = "service.actuator")
public class SyServiceActuatorConfiguration {
    private Boolean lazyMode = Boolean.FALSE;

    private Long serviceTimeoutSends = 30L;

    /**
     * 线程池的配置信息
     */
    private ThreadPoolConfig threadPoolConfig = new ThreadPoolConfig();

    @Data
    public static class ThreadPoolConfig {
        private Integer corePoolSize = SyActuatorCont.DEFAULT_ACTUATOR_CORE_THREAD_NUM;

        private Integer maximumPoolSize = SyActuatorCont.DEFAULT_ACTUATOR_MAX_THREAD_NUM;

        private Long keepAliveSeconds = SyActuatorCont.DEFAULT_ACTUATOR_THREAD_IDLE_SECONDS;

        private Integer taskQueueSize = corePoolSize;

        private String threadNamePrefix = "syf-actuator-";
    }

}
